// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Text;
using Silk.NET.Core;
using Silk.NET.Core.Native;
using Silk.NET.Core.Attributes;
using Silk.NET.Core.Contexts;
using Silk.NET.Core.Loader;

#pragma warning disable 1591

namespace Silk.NET.Core.Win32Extras
{
    [NativeName("Name", "_OUTPUT_DEBUG_STRING_INFO")]
    public unsafe partial struct OutputDebugStringInfo
    {
        public OutputDebugStringInfo
        (
            byte* lpDebugStringData = null,
            ushort? fUnicode = null,
            ushort? nDebugStringLength = null
        ) : this()
        {
            if (lpDebugStringData is not null)
            {
                LpDebugStringData = lpDebugStringData;
            }

            if (fUnicode is not null)
            {
                FUnicode = fUnicode.Value;
            }

            if (nDebugStringLength is not null)
            {
                NDebugStringLength = nDebugStringLength.Value;
            }
        }


        [NativeName("Type", "LPSTR")]
        [NativeName("Type.Name", "LPSTR")]
        [NativeName("Name", "lpDebugStringData")]
        public byte* LpDebugStringData;

        [NativeName("Type", "WORD")]
        [NativeName("Type.Name", "WORD")]
        [NativeName("Name", "fUnicode")]
        public ushort FUnicode;

        [NativeName("Type", "WORD")]
        [NativeName("Type.Name", "WORD")]
        [NativeName("Name", "nDebugStringLength")]
        public ushort NDebugStringLength;
    }
}
